Skip to content

Conversation

@philnik777
Copy link
Contributor

This moves most attributes to the C++11 syntax. Some annotations have to be moved around, since the C++11 syntax is a lot stricter on where attributes can be put.

@github-actions
Copy link

github-actions bot commented Mar 31, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h, -- libcxx/include/__algorithm/simd_utils.h libcxx/include/__config libcxx/include/__functional/function.h libcxx/include/__functional/hash.h libcxx/include/__hash_table libcxx/include/__memory/addressof.h libcxx/include/__memory/shared_ptr.h libcxx/include/__memory/temp_value.h libcxx/include/__memory/unique_temporary_buffer.h libcxx/include/__new/allocate.h libcxx/include/__new/global_new_delete.h libcxx/include/__numeric/midpoint.h libcxx/include/__random/mersenne_twister_engine.h libcxx/include/__random/uniform_int_distribution.h libcxx/include/__utility/is_pointer_in_range.h libcxx/include/__utility/is_valid_range.h libcxx/include/__vector/vector.h libcxx/include/future libcxx/include/string
View the diff from clang-format here.
diff --git a/libcxx/include/__numeric/midpoint.h b/libcxx/include/__numeric/midpoint.h
index e148da4f2..a28d6c874 100644
--- a/libcxx/include/__numeric/midpoint.h
+++ b/libcxx/include/__numeric/midpoint.h
@@ -37,7 +37,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 template <class _Tp>
 _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
     _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_Tp>,
-                                                _Tp> midpoint(_Tp __a, _Tp __b) noexcept {
+                                                _Tp>
+    midpoint(_Tp __a, _Tp __b) noexcept {
   using _Up                = make_unsigned_t<_Tp>;
   constexpr _Up __bitshift = numeric_limits<_Up>::digits - 1;
 

@philnik777 philnik777 force-pushed the use_cxx11_attributes branch 2 times, most recently from 499a18a to 6765f47 Compare March 31, 2025 18:09
@philnik777 philnik777 force-pushed the use_cxx11_attributes branch from 6765f47 to 2b4c185 Compare April 2, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant